/*
 * @Author: your name
 * @Date: 2021-06-23 14:36:37
 * @LastEditTime: 2021-06-23 20:27:38
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \totiao\src\api\searchApi.js
 */

import request from '../utils/request'

// 根据关键词请求搜索建议的api接口
export const getSuggListApi = function (q) {
  return request.get('/v1_0/suggestion', {
    params: { q }
  })
}

// 根据搜索关键词和页面值请求搜索结果的api
// q 是搜索关键字
// page 是页码值
export const getSuggResultApi = function (q, page) {
  return request.get('/v1_0/search', {
    params: { q, page }
  })
}
